package com.woniuxy.microstockserver.service.impl;

import com.woniuxy.microstockserver.bean.OutStockGoodsDetailBean;
import com.woniuxy.microstockserver.mapper.OutStockGoodsDetailMapper;
import com.woniuxy.microstockserver.service.IOutStockGoodsDetailService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 赵雄伟
 * 出库单出库商品详情 impl
 */
@Service
public class OutStockGoodsDetailServiceImpl implements IOutStockGoodsDetailService {

    @Resource
    private OutStockGoodsDetailMapper outStockGoodsDetailMapper;
    @Override
    public void saveOutStockGoodsDetailBean(Long osId, List<OutStockGoodsDetailBean> outStockGoodsDetailBeans) {
        outStockGoodsDetailMapper.saveOutStockGoodsDetailBean(osId,outStockGoodsDetailBeans);
    }

    @Override
    public List<OutStockGoodsDetailBean> findOutStockAndGoodsDetail(Long id) {
        List<OutStockGoodsDetailBean> outStockAndGoodsDetail = outStockGoodsDetailMapper.findOutStockAndGoodsDetail(id);

        return outStockAndGoodsDetail;
    }

    @Override
    public void deleteByOsId(Long id) {
        outStockGoodsDetailMapper.deleteByOsId(id);
    }
}
